<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ page isELIgnored ="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<script type="text/javascript">
//<![CDATA[
(function(){
	dojo.byId("lbl_dd_edit_typecode").innerHTML = SysAdmin._resource.ddTypeCode ;
	$kdom.appendDojoProp("input_dd_edit_typecode","missingMessage",$ksub(KppModule.commonResource.missingMessage,[SysAdmin._resource.ddTypeCode]));
	$kdom.appendDojoProp("input_dd_edit_typecode","invalidMessage",SysAdmin._resource.invalidKeyString);
	dojo.byId("lbl_dd_edit_label").innerHTML = SysAdmin._resource.ddLabel;
	$kdom.appendDojoProp("input_dd_edit_label","missingMessage",$ksub(KppModule.commonResource.missingMessage,[SysAdmin._resource.ddLabel]));
	$kdom.appendDojoProp("btn_dd_edit_save","label",KppModule.commonResource.save);
	$kdom.appendDojoProp("btn_dd_edit_cancel","label",KppModule.commonResource.cancel);
})();
//]]>
</script>
<span style="display:none">To solve IE7/8 script event tag problem.</span>
<div data-dojo-type="dijit.form.Form" data-dojo-props="action:'../../config/dd/ddtype/${dictType.id}/edit.do',id:'frm_dd_edit'">
	<table width="100%" cellspacing="10">
		<tr>
			<td><label id="lbl_dd_edit_typecode">data dictionary type code</label></td>
			<td><input id="input_dd_edit_typecode" data-dojo-type="dijit.form.ValidationTextBox" value="${dictType.typeCode}" data-dojo-props="required:true,trim:true,name:'typeCode',maxLength:20,regExp:'[a-zA-Z][a-zA-Z0-9\\-_\\.]*'"></input></td>
		</tr>
		<tr>
			<td><label id="lbl_dd_edit_label">data dictionary type label</label></td>
			<td><input id="input_dd_edit_label" data-dojo-type="dijit.form.ValidationTextBox" value="${dictType.label}" data-dojo-props="required:true,trim:true,name:'label'"></input></td>
		</tr>
	</table>
</div>
<div class="dialogFooter">
	<div id="btn_dd_edit_save" data-dojo-type="dijit.form.Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconSave', showLabel:true" style="width:70px;">
		<script type="dojo/on" data-dojo-event="click" data-dojo-args="evt">
			var options = {
				domain:SysAdmin._resource.ddType,
				refresh:DataDict.refreshType,
				button:this,
				dialogId:"dialog_config_datadict_edit",
				formId:"frm_dd_edit",
				resource:SysAdmin._resource
			};
			KppModule.restProxy(options).putUpdate();
		</script>
	</div>
	<div id="btn_dd_edit_cancel" data-dojo-type="dijit.form.Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconUndo', showLabel:true" style="width:70px;">
		<script type="dojo/on" data-dojo-event="click" data-dojo-args="evt">
				dijit.byId("dialog_config_datadict_edit").hide();
		</script>
	</div>
</div>